# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kirigami-addons
pkgver=0.3
pkgrel=0
pkgdesc="Add-ons for the Kirigami framework"
url="https://invent.kde.org/libraries/kirigami-addons"
arch="all !armhf" # armhf blocked by qt5-qtdeclarative
license="LGPL-2.0-or-later AND GPL-2.0-or-later"
depends="
	kirigami2
	qt5-qtmultimedia
	"
makedepends="
	extra-cmake-modules
	ki18n-dev
	kirigami2-dev
	qt5-qtquickcontrols2-dev
	samurai
	"
checkdepends="xvfb-run"
source="https://download.kde.org/unstable/kirigami-addons/$pkgver/kirigami-addons-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	cd build

	# tst_sounds.qml is broken
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -E "tst_sounds.qml"
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
21b2a71e459ea9c9ffe9460909f7f62f0ed2160855867b75ff61cccafd4d20cc7b50b75343e03165be5e1ac2f98d6affa4946bafa22cc6a238288d355f9521d5  kirigami-addons-0.3.tar.xz
"
